<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>合并去重</title>
</head>
<body>
<script>
    var arr=[1,2,3,4,8];
    var arr1=[2,3,4,5,6];
    var arr2=[3,4,5,9];
    arr=arr.concat(arr1);
    arr=arr.concat(arr2);
    var s=[...new Set(arr)];
    console.log(s);
</script>
</body>
</html>